﻿/**************************************************************************
创建日期:	2019.10.30
作	  者:	张存
邮 	  箱:	zhangcunliang@126.com
Copyright (c)  zhcun.cn

描	述：
记	录：
***************************************************************************/
using System;
using System.Collections.Generic;
using System.Text;
using ZhCun.DbCore;
using ZhCun.DbCore.BuildSQLText;
using ZhCun.Utils;
using ZhCun.WebCommon.AL;
using ZhCun.WebCommon.DBModels;

namespace ZhCun.WebTemplate.AL
{
    public static class DataRights
    {
        /// <summary>
        /// 初始化数据权限
        /// </summary>
        public static void InitDataRights()
        {
            DataRightsHelper.AddDataRights<TSysUser>(UserRights);

            LogHelper.LogObj.Info("已初始化数据权限");
        }

        static void UserRights(ISqlBuilder sql, EmDbOperation opType, TSysLoginToken loginState)
        {
            // 增加操作权限
            //sql.AddSqlTextByGroup(@"UserId = {0}", sql.AddParam(loginState.LoginUserId));
        }

        static void LeaderIdRights(ISqlBuilder sqlBuilder, EmDbOperation opType, TSysLoginToken loginState)
        {
            // 增加操作权限
        }
    }
}
